<!DOCTYPE html>
<html>
<head>
    <title>Surface Lofting</title>

    <script src="js/verb.min.js"></script>
    <script src="js/three.min.js"></script>
    <script src="js/verbToThreeConversion.js"></script>
    <script src="js/OrbitControls.js"></script>
    <script src="js/codemirror.js"></script>
    <script src="js/javascript.js"></script>
    <script src="js/threeBasic.js"></script>

    <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300' rel='stylesheet' type='text/css'>

    <link rel="stylesheet" href="css/codemirror.css">
    <link rel="stylesheet" href="css/example.css">
    <link rel="stylesheet" href="css/colorforth.css">
</head>
<body>

<div id="button">Show/Hide Code</div>
<div id="viewer" class="col">
    <div id="title"></div>
</div>
<div id="code-container" class="col scroll-y"></div>

</body>
<script id="script">
	setupScene();

	var c0 = verb.geom.NurbsCurve.byKnotsControlPointsWeights( 2, [0,0,0,1,1,1], [ [0,0,0], [10,0,0], [40,0,0] ], [ 1, 1, 1 ] );
	var c1 = verb.geom.NurbsCurve.byKnotsControlPointsWeights( 3, [0,0,0,0,1,1,1,1], [ [0,10,10], [10,5,10], [20,-5,10], [40,10,10] ], [ 1, 1, 1, 1 ] );
	var c2 = verb.geom.NurbsCurve.byKnotsControlPointsWeights( 3, [0,0,0,0,1,1,1,1], [ [0,0,20], [10,0,20], [20,5,20], [40,0,20] ], [ 1, 1, 1, 1, 1 ] );
	var c3 = verb.geom.NurbsCurve.byKnotsControlPointsWeights( 3, [0,0,0,0,1,1,1,1], [ [0,3,30], [10,-4,30], [20,10,30], [40,0,30] ], [ 1, 1, 1, 1, 1 ] );

	var curves = [c0, c1, c2, c3];
	var srf = verb.geom.NurbsSurface.byLoftingCurves( curves, 3 );

	addMeshToScene( srf.toThreeGeometry() );

	curves.forEach(function(c){ addCurveToScene( c.toThreeGeometry() ); });

	renderScene();
</script>
<script src="js/example.js"></script>
</html>